package com.qf.day03.homeWork;

import java.util.Scanner;
/*
定义方法，三个参数，分别是长，宽，高，计算并输出立方体的表面积
 */
public class homework01 {
    public static void  Square(double l,double w,double h) {
        //长方体表面积公式
        double square  = 2 * (l * w + w* h + l * h);
        System.out.println("长方体的表面积："+square);
    }

    public static void main(String[] args) {
        Scanner getSurface = new Scanner(System.in);
        System.out.println("请依次输入长方体的长、宽、高：");
        double l = getSurface.nextDouble();
        double w = getSurface.nextDouble();
        double h = getSurface.nextDouble();
        Square(l,w,h);
    }
}
